<template>
    <el-container>
      <el-header>
        <div class="title">
          <el-icon size="16"><Search /></el-icon
          ><span class="text">筛选搜索</span>
        </div>
        <div class="btn">
          <el-button plain v-if="resetShow" @click="emit('reset')" >重置</el-button>
          <el-button type="primary" @click="emit('search')">{{ searchText }}</el-button>
        </div>
      </el-header>
      <el-main>
        <slot name="main"></slot>
      </el-main>
    </el-container>
</template>

<script setup lang="ts">
import { Search } from "@element-plus/icons-vue";
defineProps({
    searchText:{
        type:String,
        default:'查询搜索'
    },
    resetShow:{
        type:Boolean,
        default:true
    }
})
let emit=defineEmits(['search','reset'])
</script>

<style lang="less" scoped>
  .text {
    font-size: 14px;
    margin-left: 10px;
  }
</style>